import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)
export default new Vuex.Store({
  // 应用初始状态
  state: {
    NodeName: JSON.parse(localStorage.getItem('NodeName'))
    // NodeName: ''
  },
  // 操作state
  mutations: {
    SAVE_NODENAME(state, NodeName) {
      localStorage.setItem('NodeName', JSON.stringify(NodeName))
      state.NodeName = NodeName
    }
  },
  actions: {
  }
})
